<?php
	
	include 'database.php';
			
	if($_POST['delete'])
	{
			
		
		if(isset($_POST['checkbox'])){
		
			$checkbox = $_POST['checkbox']; 
			$countCheck = count($_POST['checkbox']);
			
			for($i=0;$i<$countCheck;$i++)
			{
				$del_id  = $checkbox[$i];
				
				$sql = "DELETE FROM pizza_besteld WHERE id = '$del_id'";
				$result = mysqli_query($dbcon, $sql) or die('NEE');
				
			}
		}
		else{}	
			
		
		
		
		header('location: back_end_bestellingen.php');	
			
			
	}	

	
	
	
	
?>